const path = require('path');
const webpack = require("webpack");
// 拼接路径
function resolve(dir) {
  return path.join(__dirname, dir)
}


module.exports = {
	outputDir: process.env.outputDir, //配置生产 开发环境
	chainWebpack:config => {
		config.resolve.alias
      .set('@', resolve('src'))
	},
	configureWebpack: {
    plugins: [new webpack.ProvidePlugin({ 'window.Quill': 'quill/dist/quill.js','Quill': 'quill/dist/quill.js'})],
		performance: {
				hints:'warning',
				maxEntrypointSize: 50000000,
				maxAssetSize: 30000000,
				assetFilter: function(assetFilename) {
						return assetFilename.endsWith('.js');
				}
		}
  },
	devServer: {
		open: true,
		// host:'192.168.100.17',
		port:'9002',
		https:false,
		proxy: {
			'/api': {
				target: 'https://crm.goanyway.host/',
				changeOrigin: true,
				pathRewrite: { '^/api': '' }
			}
		}
	}
}
